/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __LED_H
#define __LED_H

#define			LED_GPIO
//#define			LED_PWM

#ifdef LED_GPIO

#include "gpio.h"

struct _led_t{
	GPIO_TypeDef  *GPIOx;
	uint16_t GPIO_PINx;
};

#define LED_ON		GPIO_PIN_RESET
#define LED_OFF		GPIO_PIN_SET

#elif defined(LED_PWM)

#include "tim.h"

#define LED_MAX_PWM			(1000)

struct _led_t{
	TIM_HandleTypeDef  *htimx;
	uint32_t Channel;
};
#endif

// 指示灯初始化
void led_init(void);

void led_on(unsigned char _led_
#ifdef LED_GPIO
);
#elif
, unsigned short degree); 
#endif


void led_off(unsigned char LED);
void led_not(unsigned char LED);
void led_onNum(unsigned char num);
void Open_led(void);
void Close_led(void);
#endif /* __LED_H */

/******************* (H) COPYRIGHT 2023 FUYEBING*****END OF FILE************/

